package com.jeesite.modules.dataScreen.web.vo;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel("三级城运中心列表对象")
public class UrbanMovementVo {

    @ApiModelProperty("事件ID")
    private String eventNum;
    @ApiModelProperty("来源")
    private String sourceSystemCode;
    @ApiModelProperty("事件标题")
    private String eventTitle;

    @ApiModelProperty("事件时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date happenTime;

    @ApiModelProperty("事件状态,0:未结案,1:已结案")
    private String endStatus;

    @ApiModelProperty("事件等级")
    private String level;

    @ApiModelProperty("经度")
    private String lon;
    @ApiModelProperty("维度")
    private String lat;

    public void assemblyLevel() {
        //表原始等级，一般 0；较大 1；重大 2；特别重大 3
        if (StrUtil.isBlank(level)) {
            return;
        }
        //该操作是为了前端方便
        this.level = String.valueOf(Integer.parseInt(level) + 1);
    }
}
